package com.auxgroup.hr.front.site.co.personnel;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.auxgroup.hr.front.commons.vo.BaseResponseVO;
import com.auxgroup.hr.front.dao.domain.PsCTactPerTbl;
import com.auxgroup.hr.front.dozer.IObjectMapper;
import com.auxgroup.hr.front.service.personnal.TactPerTblService;
import com.auxgroup.hr.front.site.co.BaseCO;

/**
 * 紧急情况联系人CO
 * 
 * @author wangchangyun
 * @version 创建时间：180523
 */
@RestController
@RequestMapping("${auxgroup.hr.contextPath}/tactPerTbl")
public class TactPerTblCO extends BaseCO {

	private static final Logger logger = LoggerFactory.getLogger(TactPerTblCO.class);

	@Autowired
	public TactPerTblService tactPerTblService;

	@Resource(name = "dozerMapper")
	protected IObjectMapper objectMapper;
	
	/**
	 * 获取紧急情况联系人
	 * @param hireId
	 * @return
	 */
	@GetMapping(value = "/getOne")
	public BaseResponseVO getOne(String emplid) {
		logger.info("getTactPerTbl emplid= {}", emplid);
		PsCTactPerTbl tactPerTbl = tactPerTblService.getTactPerTbl(emplid);
		return buildRespone(tactPerTbl);
	}
	
}
